package com.github.gin.springboot.respostory;

import com.github.gin.springboot.model.City;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * Created by FSTMP on 2016/12/22.
 */
public interface CityRespostory extends JpaRepository<City, Integer> {

    @Cacheable(value = "mycache")
    List<City> findByName(String name,Pageable pageable);
}
